Programming in Equational Logic: Beyond Strong Sequentiality
نویسندگان
چکیده
Orthogonal term rewriting systems (also known as regular systems) provide an elegant framework for programming in equational logic. O'Donnell showed that the parallel-outermost strategy, which replaces all outermost redexes in each step, is complete for such systems. Many of the reductions performed by this strategy could be wasteful in general. A lazy normalization algorithm that completely eliminated these wasteful reductions by reducing only \needed redexes" was later developed by Huet and Levy. However, this algorithm required the input programs to be restricted to the subclass of strongly sequential systems. This is because needed redexes do not exist for all orthogonal programs, and even when they do, they may not be computable. It is therefore quite natural to ask whether it is possible to devise a complete normalization algorithm for the entire class that minimizes (rather than eliminate) the wasteful reductions. In this paper we propose a solution to this problem using the concept of a necessary set of redexes. In such a set, at least one of the redexes must be reduced to normalize a term. We devise an algorithm to compute a necessary set for any term not in normal form and show that a strategy that repeatedly reduces all redexes in such a set is complete for orthogonal programs. We also show that our algorithm is \optimal" among all normalization algorithms that are based on left-hand sides alone. This means that our algorithm is lazy (like Huet-Levy's) on strongly sequential parts of a program and \relaxes laziness minimally" to handle the other parts and thus does not sacriice generality for the sake of eeciency.
منابع مشابه
Category-based Semantics for Equational and Constraint Logic Programming
This thesis proposes a general framework for equational logic programming, called catf:gory based equational logic by placing the general principles underlying the design of the pro gramming language Eqlog and formulated by Goguen and Meseguer into an abstract form. This framework generalises equational deduction to an arbitrary category satisfy ing certain natural conditions; completeness i...
متن کاملSequentiality, Second Order Monadic Logic and Tree Automata
Given a term rewriting system R and a normalizable term t, a redex is needed if in any reduction sequence of t to a normal form, this redex will be contracted. Roughly, R is sequential if there is an optimal reduction strategy in which only needed redexes are contracted. More generally, G. Huet and J.-J. L evy deene in 9] the sequentiality of a predicate P on partially evaluated terms. We show ...
متن کاملOn Extra Variables in (Equational) Logic Programming
Extra variables in a clause are variables which occur in the body but not in the head. It has been argued that extra variables are necessary and contribute to the expressive power of logic languages. In the first part of this paper, we show that this is not true in general. For this purpose, we provide a simple syntactic transformation of each logic program into a logic program without extra va...
متن کاملProgramming with Equations: A Framework for Lazy Parallel Evaluation
Huet and Levy pioneered lazy sequential evaluation of equational programs based on the concepts of strong-sequentiality and needed redexes. Natural extensions of their strategy are not well-suited for parallel evaluation since they do not support independent searches for needed redexes along diierent paths in the input term. Furthermore, the size of compiled code can be exponential in program s...
متن کاملFunctional Logic Programming in Maude
Functional logic programming languages combine the most important features of functional programming languages and logic programming languages. Functional logic programming applied to theMaude specification language would replace the functional viewpoint by an equational viewpoint while retaining the logic features. This paper tries to bridge the gap between functional logic languages and the c...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 1990